const fp = require("lodash/fp");
const cars = require("./data.json");

const getLastStockStatus = fp.flowRight(
  (car) => fp.prop("in_stock", car),
  fp.last
);

console.log(getLastStockStatus(cars));
